home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / x / volume9 / xengine / patch1 < prev    next >
Encoding:
Internet Message Format  |  1993-05-04  |  13.1 KB

  1. From: kddlab!isl.yamaha.co.jp!shutoh@uunet.UU.NET (Kazuhiko Shutoh)
  2. Newsgroups: comp.sources.x
  3. Subject: v09i068: xengine: reciprocating engine for X, Patch1, Part01/01
  4. Message-ID: <143448@sun.Eng.Sun.COM>
  5. Date: 7 Oct 90 18:09:00 GMT
  6. Approved: argv@sun.com
  7.  
  8. Submitted-by: kddlab!isl.yamaha.co.jp!shutoh@uunet.UU.NET (Kazuhiko Shutoh)
  9. Posting-number: Volume 9, Issue 68
  10. Archive-name: xengine/patch1
  11. Patch-To: xengine: Volume 9, Issue 46 (9/23/90)
  12.  
  13. #! /bin/sh
  14. # This is a shell archive.  Remove anything before this line, then unpack
  15. # it by saving it into a file and typing "sh file".  To overwrite existing
  16. # files, type "sh file -c".  You can also feed this as standard input via
  17. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  18. # will see the following message at the end:
  19. #        "End of shell archive."
  20. # Contents:  xengine.patch1
  21. # Wrapped by shutoh@uni on Tue Oct  2 19:37:02 1990
  22. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  23. if test -f 'xengine.patch1' -a "${1}" != "-c" ; then 
  24.   echo shar: Will not clobber existing file \"'xengine.patch1'\"
  25. else
  26. echo shar: Extracting \"'xengine.patch1'\" \(11551 characters\)
  27. sed "s/^X//" >'xengine.patch1' <<'END_OF_FILE'
  28. Xdiff -rc old/Makefile new/Makefile
  29. X*** old/Makefile    Tue Oct  2 19:22:43 1990
  30. X--- new/Makefile    Tue Oct  2 19:24:18 1990
  31. X***************
  32. X*** 7,13 ****
  33. X  #
  34. X  
  35. X  ###########################################################################
  36. X! # Makefile generated from "Imake.tmpl" and </tmp/IIf.a02029>
  37. X  # $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim Exp $
  38. X  #
  39. X  # Platform-specific parameters may be set in the appropriate .cf
  40. X--- 7,13 ----
  41. X  #
  42. X  
  43. X  ###########################################################################
  44. X! # Makefile generated from "Imake.tmpl" and </tmp/IIf.a01700>
  45. X  # $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim Exp $
  46. X  #
  47. X  # Platform-specific parameters may be set in the appropriate .cf
  48. X***************
  49. X*** 225,231 ****
  50. X  ###########################################################################
  51. X  # start of Imakefile
  52. X  
  53. X! # SCCS ID : %W%   %G%
  54. X  #
  55. X  #   Imakefile - Imakefile for xengine
  56. X  #
  57. X--- 225,231 ----
  58. X  ###########################################################################
  59. X  # start of Imakefile
  60. X  
  61. X! # SCCS ID : @(#)Imakefile    1.1   9/12/90
  62. X  #
  63. X  #   Imakefile - Imakefile for xengine
  64. X  #
  65. Xdiff -rc old/README new/README
  66. X*** old/README    Tue Oct  2 19:22:44 1990
  67. X--- new/README    Tue Oct  2 19:23:16 1990
  68. X***************
  69. X*** 31,65 ****
  70. X       70   120    PolyFillRectangle
  71. X       71   100    PolyFillArc
  72. X  
  73. X  
  74. X! --- Benchmarks **
  75. X  
  76. X! Machine                Server Release            rpm
  77. X  -----------------------------------------------------------------------------
  78. X  SparcStation 370 Memory 56M     X11R4(fix-14),256 color         230
  79. X  SparcStation 1          X11R4(applied fix-14) 256 color    186.33
  80. X  luna-88K,2 CPU,mach Memory 32M  X11R4, 16 color           180  *1
  81. X! Sun 3/60C(CG4)            X11R4 fix-14 gcc-1.35.1    16color about 90
  82. X  Sun 3/60C               X11R4 no-fix             73.3
  83. X  CIT-X Terminal          X11R3 mono            45.5
  84. X  X-mint Memory 8M                X11R3,mono                      45
  85. X  X-station Memory 8M             X11R3,256 color                 40
  86. X  NEWS841 memory 16M              X11R2, 16 color                 11
  87. X  X640                X11R3?(mono)            10.4
  88. X  MASSCOMP RTU            X11R2? 16 color            8.5
  89. X  
  90. X! *1 beta version OS(MACH).
  91. X  
  92. X! ** These rpm are *not* official. If you want exact server's performance,
  93. X!    use other benchmark tools (such as xperf or xtest).
  94. X  
  95. X! --- Special thanks to:
  96. X!     
  97. X!     Yasushi Ohba(YAMAHA/ISL)    Mathematical suggestion. 
  98. X!     Toshihisa Sadakata(YAMAHA/ISL)    Engine movement suggestion. 
  99. X!     Susumu Mukawa (NTT)        Benchmark data correction.
  100. X!     Kazunari "ISSEY" Nakamura (NKK) Benchmark data correction.
  101. X  
  102. X      Send any comments, bug reports, etc. are welcome.
  103. X  
  104. X  
  105. X--- 31,99 ----
  106. X       70   120    PolyFillRectangle
  107. X       71   100    PolyFillArc
  108. X  
  109. X+ --- Special thanks to:
  110. X  
  111. X!     Yasushi Ohba (YAMAHA/ISL)    
  112. X!                 Mathematical.
  113. X!     Toshihisa Sadakata (YAMAHA/ISL)
  114. X!                 Engine movement. 
  115. X!      Hitoshi Tsujimura <hitosi@sinbasi.trad.pfu.fujitsu.co.jp> 
  116. X!                 Bug report & fix.
  117. X  
  118. X! 
  119. X! --- Benchmarks
  120. X!     
  121. X!                xengine benchmark
  122. X! 
  123. X! Thanks to :
  124. X! 
  125. X!     "Greg Onufer" <greg@cheers.Bungi.COM>
  126. X!     Kazunari "ISSEY" Nakamura <kazu@the.nkk.co.jp>
  127. X!     Susumu-Mukawa <mukawa@ctec.tn-sec.ntt.jp>
  128. X!     kaneyasu@src.ricoh.co.jp (Noriyuki Kaneyasu)
  129. X!     palm@icrl.mew.mei.co.jp (Steve [kiwin] Palm)
  130. X!     saitoh@icsts1.osaka-u.ac.jp (SAITOH Akinori)
  131. X!     sato@rokoh.gen.u-tokyo.ac.jp (Keisuke (@_@) SATO)
  132. X!     take@studiogen.co.jp (Wataru Takenouchi)
  133. X! 
  134. X! Machine                Server                RPM
  135. X  -----------------------------------------------------------------------------
  136. X+ DEC Station 3100        X11R4(fix-?),mono        539  *4
  137. X+ DEC Station 5000/200 16M    X11R4(fix-14),256 color         473  
  138. X+ Sun4/370GXP SPARC 16MHz(?)     X11R4(fix-12),mono        438
  139. X+ SparcStation 470 Memory 32M     X11R4(fix-14),256color (GX)     301.8 
  140. X+ DEC Station 3100/200 16M    X11R4(fix-14),256 color         248 ~ 268 
  141. X+ SparcStation IPC Memory 24M     X11R4(fix-6), 256 color        234
  142. X  SparcStation 370 Memory 56M     X11R4(fix-14),256 color         230
  143. X+ Sun4c/60GX  10MHz(?)         X11R4(fix-12),256 color        200
  144. X  SparcStation 1          X11R4(applied fix-14) 256 color    186.33
  145. X  luna-88K,2 CPU,mach Memory 32M  X11R4, 16 color           180  *1
  146. X! Sun4/260C  10MHz(?)         X11R4(fix-12), 256 color    155
  147. X! Sun3/50M 12M            X11R4(fix-14+local patch)mono    136  *3
  148. X! Sun3/150M  16MHz         X11R4(fix-12), mono        132
  149. X! Sun 3/60C(CG4)            X11R4 fix-14 gcc-1.35.1    16color    about 90
  150. X! Sun3/110LC 16MHz         X11R4(fix-12),256 color        75
  151. X  Sun 3/60C               X11R4 no-fix             73.3
  152. X  CIT-X Terminal          X11R3 mono            45.5
  153. X+ NWS-1750 + XMiNT          X11R3? mono            46 ~ 48
  154. X  X-mint Memory 8M                X11R3,mono                      45
  155. X  X-station Memory 8M             X11R3,256 color                 40
  156. X+ Sun-2/120,7M            X11R4(fix-14),gcc-1.37.1,mono    21.6
  157. X  NEWS841 memory 16M              X11R2, 16 color                 11
  158. X  X640                X11R3?(mono)            10.4
  159. X+ NWS1450 (color)             ??                10   *2 
  160. X  MASSCOMP RTU            X11R2? 16 color            8.5
  161. X+ PC-Xview 386sx 16MHz Memory 4M 
  162. X+         16bitBUS-VGA    X11R3                3.5
  163. X  
  164. X! *1  OS is Beta version.
  165. X  
  166. X! *2  Why slow?
  167. X  
  168. X! *3  Local optimize was applied to server.
  169. X  
  170. X+ *4  Very fast !
  171. X+ 
  172. X      Send any comments, bug reports, etc. are welcome.
  173. X  
  174. X  
  175. X***************
  176. X*** 68,71 ****
  177. X--- 102,111 ----
  178. X                          InSoft System Lab.
  179. X                          YAMAHA Corp.
  180. X                          shutoh@isl.yamama.co.jp
  181. X+ 
  182. X+ 
  183. X+ 
  184. X+ 
  185. X+ 
  186. X+ 
  187. X  
  188. Xdiff -rc old/patchlevel.h new/patchlevel.h
  189. X*** old/patchlevel.h    Tue Oct  2 19:22:44 1990
  190. X--- new/patchlevel.h    Tue Oct  2 19:21:52 1990
  191. X***************
  192. X*** 1,2 ****
  193. X  
  194. X! #define PATCHLEVEL 0
  195. X--- 1,3 ----
  196. X  
  197. X! #define PATCHLEVEL 1
  198. X! 
  199. Xdiff -rc old/xengine.c new/xengine.c
  200. X*** old/xengine.c    Tue Oct  2 19:22:45 1990
  201. X--- new/xengine.c    Tue Oct  2 19:21:52 1990
  202. X***************
  203. X*** 1,4 ****
  204. X! static char     sccsid[] = "@(#)xengine.c    1.9   9/19/90";
  205. X  
  206. X  /*
  207. X   * xengine - reciprocating engine for X     :-)
  208. X--- 1,4 ----
  209. X! static char     sccsid[] = "@(#)xengine.c    1.10   10/2/90";
  210. X  
  211. X  /*
  212. X   * xengine - reciprocating engine for X     :-)
  213. X***************
  214. X*** 119,167 ****
  215. X      /* Get graphic context     */
  216. X  
  217. X      gcPiston = XCreateGC(XtDisplay(engine), XtWindow(engine), (unsigned long) 0, NULL);
  218. X!     XAllocNamedColor(XtDisplay(engine), DefaultColormap(XtDisplay(engine), 0), colors[0], &srcColor, &dummyColor);
  219. X  
  220. X      XSetForeground(XtDisplay(engine), gcPiston, srcColor.pixel);
  221. X  
  222. X      gcShaft = XCreateGC(XtDisplay(engine), XtWindow(engine), (unsigned long) 0, NULL);
  223. X!     XAllocNamedColor(XtDisplay(engine), DefaultColormap(XtDisplay(engine), 0), colors[1], &srcColor, &dummyColor);
  224. X  
  225. X      XSetForeground(XtDisplay(engine), gcShaft, srcColor.pixel);
  226. X      XSetLineAttributes(XtDisplay(engine), gcShaft, 2, LineSolid, CapButt, JoinMiter);
  227. X  
  228. X      gcCylinder = XCreateGC(XtDisplay(engine), XtWindow(engine), (unsigned long) 0, NULL);
  229. X!     XAllocNamedColor(XtDisplay(engine), DefaultColormap(XtDisplay(engine), 0), colors[2], &srcColor, &dummyColor);
  230. X  
  231. X      XSetForeground(XtDisplay(engine), gcCylinder, srcColor.pixel);
  232. X  
  233. X      gcRoter = XCreateGC(XtDisplay(engine), XtWindow(engine), (unsigned long) 0, NULL);
  234. X!     XAllocNamedColor(XtDisplay(engine), DefaultColormap(XtDisplay(engine), 0), colors[3], &srcColor, &dummyColor);
  235. X  
  236. X      XSetForeground(XtDisplay(engine), gcRoter, srcColor.pixel);
  237. X  
  238. X      gcBack = XCreateGC(XtDisplay(engine), XtWindow(engine), (unsigned long) 0, NULL);
  239. X!     XAllocNamedColor(XtDisplay(engine), DefaultColormap(XtDisplay(engine), 0), colors[4], &srcColor, &dummyColor);
  240. X  
  241. X      XSetForeground(XtDisplay(engine), gcBack, srcColor.pixel);
  242. X  
  243. X      gcDep = XCreateGC(XtDisplay(engine), XtWindow(engine), (unsigned long) 0, NULL);
  244. X!     XAllocNamedColor(XtDisplay(engine), DefaultColormap(XtDisplay(engine), 0), colors[5], &srcColor, &dummyColor);
  245. X  
  246. X      XSetForeground(XtDisplay(engine), gcDep, srcColor.pixel);
  247. X  
  248. X      gcPre = XCreateGC(XtDisplay(engine), XtWindow(engine), (unsigned long) 0, NULL);
  249. X!     XAllocNamedColor(XtDisplay(engine), DefaultColormap(XtDisplay(engine), 0), colors[6], &srcColor, &dummyColor);
  250. X  
  251. X      XSetForeground(XtDisplay(engine), gcPre, srcColor.pixel);
  252. X  
  253. X      gcEngine = XCreateGC(XtDisplay(engine), XtWindow(engine), (unsigned long) 0, NULL);
  254. X!     XAllocNamedColor(XtDisplay(engine), DefaultColormap(XtDisplay(engine), 0), colors[7], &srcColor, &dummyColor);
  255. X  
  256. X      XSetForeground(XtDisplay(engine), gcEngine, srcColor.pixel);
  257. X  
  258. X      /* Create engine Pixmap */
  259. X  
  260. X!     enginePixmap = XCreatePixmap(XtDisplay(engine), XtWindow(engine), width, height, DefaultDepth(XtDisplay(engine), 0));
  261. X  
  262. X      /* Interval timer start     */
  263. X      XtAddTimeOut(1, Cycle, NULL);
  264. X--- 119,168 ----
  265. X      /* Get graphic context     */
  266. X  
  267. X      gcPiston = XCreateGC(XtDisplay(engine), XtWindow(engine), (unsigned long) 0, NULL);
  268. X!     XAllocNamedColor(XtDisplay(engine), DefaultColormapOfScreen(XtScreen(engine)), colors[0], &srcColor, &dummyColor);
  269. X  
  270. X      XSetForeground(XtDisplay(engine), gcPiston, srcColor.pixel);
  271. X  
  272. X      gcShaft = XCreateGC(XtDisplay(engine), XtWindow(engine), (unsigned long) 0, NULL);
  273. X!     XAllocNamedColor(XtDisplay(engine), DefaultColormapOfScreen(XtScreen(engine)), colors[1], &srcColor, &dummyColor);
  274. X  
  275. X      XSetForeground(XtDisplay(engine), gcShaft, srcColor.pixel);
  276. X      XSetLineAttributes(XtDisplay(engine), gcShaft, 2, LineSolid, CapButt, JoinMiter);
  277. X  
  278. X      gcCylinder = XCreateGC(XtDisplay(engine), XtWindow(engine), (unsigned long) 0, NULL);
  279. X!     XSetGraphicsExposures(XtDisplay(engine), gcCylinder, False);
  280. X!     XAllocNamedColor(XtDisplay(engine), DefaultColormapOfScreen(XtScreen(engine)), colors[2], &srcColor, &dummyColor);
  281. X  
  282. X      XSetForeground(XtDisplay(engine), gcCylinder, srcColor.pixel);
  283. X  
  284. X      gcRoter = XCreateGC(XtDisplay(engine), XtWindow(engine), (unsigned long) 0, NULL);
  285. X!     XAllocNamedColor(XtDisplay(engine), DefaultColormapOfScreen(XtScreen(engine)), colors[3], &srcColor, &dummyColor);
  286. X  
  287. X      XSetForeground(XtDisplay(engine), gcRoter, srcColor.pixel);
  288. X  
  289. X      gcBack = XCreateGC(XtDisplay(engine), XtWindow(engine), (unsigned long) 0, NULL);
  290. X!     XAllocNamedColor(XtDisplay(engine), DefaultColormapOfScreen(XtScreen(engine)), colors[4], &srcColor, &dummyColor);
  291. X  
  292. X      XSetForeground(XtDisplay(engine), gcBack, srcColor.pixel);
  293. X  
  294. X      gcDep = XCreateGC(XtDisplay(engine), XtWindow(engine), (unsigned long) 0, NULL);
  295. X!     XAllocNamedColor(XtDisplay(engine), DefaultColormapOfScreen(XtScreen(engine)), colors[5], &srcColor, &dummyColor);
  296. X  
  297. X      XSetForeground(XtDisplay(engine), gcDep, srcColor.pixel);
  298. X  
  299. X      gcPre = XCreateGC(XtDisplay(engine), XtWindow(engine), (unsigned long) 0, NULL);
  300. X!     XAllocNamedColor(XtDisplay(engine), DefaultColormapOfScreen(XtScreen(engine)), colors[6], &srcColor, &dummyColor);
  301. X  
  302. X      XSetForeground(XtDisplay(engine), gcPre, srcColor.pixel);
  303. X  
  304. X      gcEngine = XCreateGC(XtDisplay(engine), XtWindow(engine), (unsigned long) 0, NULL);
  305. X!     XAllocNamedColor(XtDisplay(engine), DefaultColormapOfScreen(XtScreen(engine)), colors[7], &srcColor, &dummyColor);
  306. X  
  307. X      XSetForeground(XtDisplay(engine), gcEngine, srcColor.pixel);
  308. X  
  309. X      /* Create engine Pixmap */
  310. X  
  311. X!     enginePixmap = XCreatePixmap(XtDisplay(engine), XtWindow(engine), width, height, DefaultDepthOfScreen(XtScreen(engine)));
  312. X  
  313. X      /* Interval timer start     */
  314. X      XtAddTimeOut(1, Cycle, NULL);
  315. X***************
  316. X*** 187,193 ****
  317. X      height = args[1].value;
  318. X  
  319. X      XFreePixmap(XtDisplay(engine), enginePixmap);
  320. X!     enginePixmap = XCreatePixmap(XtDisplay(engine), XtWindow(engine), width, height, DefaultDepth(XtDisplay(engine), 0));
  321. X  
  322. X  }
  323. X  
  324. X--- 188,194 ----
  325. X      height = args[1].value;
  326. X  
  327. X      XFreePixmap(XtDisplay(engine), enginePixmap);
  328. X!     enginePixmap = XCreatePixmap(XtDisplay(engine), XtWindow(engine), width, height, DefaultDepthOfScreen(XtScreen(engine)));
  329. X  
  330. X  }
  331. X  
  332. X***************
  333. X*** 331,334 ****
  334. X--- 332,337 ----
  335. X      return (cycle);
  336. X  
  337. X  }
  338. X+ 
  339. X+ 
  340. X  
  341. END_OF_FILE
  342. if test 11551 -ne `wc -c <'xengine.patch1'`; then
  343.     echo shar: \"'xengine.patch1'\" unpacked with wrong size!
  344. fi
  345. # end of 'xengine.patch1'
  346. fi
  347. echo shar: End of shell archive.
  348. exit 0
  349.  
  350. dan
  351. ----------------------------------------------------
  352. O'Reilly && Associates   argv@sun.com / argv@ora.com
  353. Opinions expressed reflect those of the author only.
  354.